qemu: Send unit_attention on cd-rom not_ready to ready transition
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 14 May 2008 08:15:02 +0000 (09:15 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 14 May 2008 08:15:02 +0000 (09:15 +0100)
commiteaad775dc26f767c5c281f294ddedd64ac63602f
tree66b6174e7b9a7de102630e11d9bb49744abd49cc
parent34b1fea64bd953ec6b69b0a631aee2c1d0283a1e
qemu: Send unit_attention on cd-rom not_ready to ready transition

Patch sends a UNIT_ATTENTION(6), MEDIUM_MAY_HAVE_CHANGED(0x28) sense
when cdrom transitions from not ready to ready.

ATA Packet interface for CD-ROMS, SFF8020i.pdf. See state diagram
Figure 12, page 82 and Table 44 -recommended Sense Key, ASC

With patch in place HVM win2008 server guest sees the CD/DVD contents
have changed when the media is switched.

Signed-off-by: Pat Campbell <plc@novell.com>
tools/ioemu/hw/ide.c